<!DOCTYPE html>
<html lang="en" style="width: 100%; height: 100%;">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" href="/fontPlayer-logo.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>字玩</title>
    <style>
      body, html {
        width: 100%;
        height: 100%;
        position: relative;
        padding: 0;
        margin: 0;
        overflow: hidden;
      }
      .empty {
        .empty-loading {
          .loading-1 {
            animation: loading-1 2s;
            animation-iteration-count: infinite;
          }
          .loading-2 {
            animation: loading-2 2s;
            animation-iteration-count: infinite;
          }
          .loading-3 {
            animation: loading-3 2s;
            animation-iteration-count: infinite;
          }
        }
      }
    
      @keyframes loading-1 {
        0% {
          opacity: 1;
        }
        25% {
          opacity: 0.5;
        }
        50% {
          opacity: 1;
        }
      }
    
      @keyframes loading-2 {
        0% {
          opacity: 1;
        }
        50% {
          opacity: 0.5;
        }
        75% {
          opacity: 1;
        }
      }
    
      @keyframes loading-3 {
        0% {
          opacity: 1;
        }
        75% {
          opacity: 0.5;
        }
        100% {
          opacity: 1;
        }
      }
    </style>
  </head>
  <body style="width: 100%; height: 100%;">
    <div class="empty" style="
      position: absolute;
      z-index: -99;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    ">
      <div class="enpty-tips">首次打开可能会有些慢，感谢耐心等待</div>
      <div class="empty-loading" style="
        display: flex;
        flex-direction: row;
        gap: 20px;
        align-items: center;
        justify-content: center;
        margin-top: 48px;
      ">
        <div class="loading-1" style="
          width: 14px;
          height: 14px;
          border-radius: 50%;
          background-color: black;
        "></div>
        <div class="loading-2" style="
          width: 14px;
          height: 14px;
          border-radius: 50%;
          background-color: black;
        "></div>
        <div class="loading-3" style="
          width: 14px;
          height: 14px;
          border-radius: 50%;
          background-color: black;
        "></div>
      </div>
    </div>
    <div id="app"></div>
    <div id="glyph-template">
      <div class="glyph">
        <span class="preview">
          <div class="empty-line-1"></div>
          <div class="empty-line-2"></div>
          <canvas
            class="preview-canvas"
            width="100"
            height="100"
          ></canvas>
        </span>
        <span class="info">
          <span class="name"></span>
        </span>
        <span class="icon-group">
          <span class="copy-icon"></span>
          <span class="edit-icon"></span>
          <span class="delete-icon"></span>
        </span>
      </div>
    </div>
    <div id="default-glyph-template">
      <div class="default-glyph">
        <div class="add-glyph-btn-wrapper"></div>
      </div>
    </div>
    <div id="character-template">
      <div class="character">
        <span class="preview">
          <div class="empty-line-1"></div>
          <div class="empty-line-2"></div>
          <canvas
            class="preview-canvas" 
            width="100"
            height="100"
          ></canvas>
        </span>
        <span class="info">
          <span class="text"></span>
          <span class="unicode"></span>
        </span>
        <span class="icon-group">
          <span class="copy-icon"></span>
          <span class="edit-icon"></span>
          <span class="delete-icon"></span>
        </span>
      </div>
    </div>
    <div id="default-character-template">
      <div class="default-character">
        <div class="add-text-btn-wrapper"></div>
      </div>
    </div>
    <div id="playground-character-template">
      <div class="char-preview">
        <canvas width="100" height="100" class="playground-preview-canvas"></canvas>
      </div>
    </div>
    <script type="module" src="/src/main.ts"></script>
    <script src="lib/opencv.js"></script>
    <!-- <script src="/lib/opencv.js"></script> -->
    <!-- <script src="/fontplayer_demo/lib/opencv.js"></script> -->
  </body>
</html>